﻿using System;


namespace NLite.Mini.Fluent
{
    /// <summary>
    /// 契约表达式接口
    /// </summary>
    public interface IContractExpression : IRegistryExpression
    {
        /// <summary>
        /// 设置组件类型
        /// </summary>
        /// <param name="componentType"></param>
        /// <returns></returns>
        IComponentExpression To(Type componentType);

        /// <summary>
        /// 设置组件类型
        /// </summary>
        /// <typeparam name="TComponent"></typeparam>
        /// <returns></returns>
        IComponentExpression To<TComponent>();

        /// <summary>
        /// 设置组件的工厂方法
        /// </summary>
        /// <param name="factory"></param>
        /// <returns></returns>
        IFactoryExpression Factory(Func<object> factory);
    }
}
